var EllipsisText = (function()
{
	if (document.getBoxObjectFor && window.openDialog)
	{
		//return XUL label
		var sNS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
		var xml =  document.createElementNS(sNS , "window");
		var label = document.createElementNS(sNS, "description");
		label.setAttribute('crop','end');
		xml.appendChild(label); 
		
		var fn = function(el)
		{
			var xml2 =  xml.cloneNode(true);
			xml2.firstChild.setAttribute("value", el.textContent);
			el.innerHTML = "";
			el.appendChild(xml2);
		};
		
		var a = document.getElementsByClassName("no-overflow");
		for (var i = 0; el=a[i]; i++)
		{
			fn(el);
		}
	}
	else
	{
		return function() {};
	}

	return fn;
})();